package com.example.domain;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * @author 袁小弘
 * @describe 培训中心学生管理————考勤类
 * @date 2019-12-17 14:18
 */
@Entity
@Table(name = "attendance")
public class Attendance implements Serializable {

    private static final long serialVersionUID = 1738612956466643343L;

    @Id
    @GeneratedValue
    @Column(name = "attendance_Id")
    private Integer attendanceId;// 考勤ID

    @Column(name = "user_Id")
    private Integer userId;// 学生ID

    @Column(name = "attendanceTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp attendanceTime;// 考勤时间

    @Column(name = "attendanceStatus", length = 32)
    private String attendanceStatus;// 考勤状态

    @Column(name = "cause", length = 255)
    private String cause;// 未到原因

    @Column(name = "comment", length = 255)
    private String comment;// 备注说明

    @Column(name = "recordTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp recordTime;// 创建记录时间

    @Column(name = "updateTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp updateTime;// 更新记录时间

    public Attendance() {
        // 无参构造
    }

    public Integer getAttendanceId() {
        return attendanceId;
    }

    public void setAttendanceId(Integer attendanceId) {
        this.attendanceId = attendanceId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Timestamp getAttendanceTime() {
        return attendanceTime;
    }

    public void setAttendanceTime(Timestamp attendanceTime) {
        this.attendanceTime = attendanceTime;
    }

    public String getAttendanceStatus() {
        return attendanceStatus;
    }

    public void setAttendanceStatus(String attendanceStatus) {
        this.attendanceStatus = attendanceStatus;
    }

    public String getCause() {
        return cause;
    }

    public void setCause(String cause) {
        this.cause = cause;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public Timestamp getRecordTime() {
        return recordTime;
    }

    public void setRecordTime(Timestamp recordTime) {
        this.recordTime = recordTime;
    }

    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "Attendance [attendanceId=" + attendanceId + ", userId=" + userId + ", attendanceTime=" + attendanceTime
                + ", attendanceStatus=" + attendanceStatus + ", cause=" + cause + ", comment=" + comment
                + ", recordTime=" + recordTime + ", updateTime=" + updateTime + "]";
    }


}
